package com.ncr.travel.appmgr.model;

import java.util.List;

import com.ncr.travel.appmgr.model.shared.AuditField;
import com.ncr.travel.appmgr.model.shared.StationsAuditCriteria;

/**
 * @author ng185038
 * 
 */
public class StationsAuditCriteriaJson implements StationsAuditCriteria {

	private StationsAuditCriteriaDataJson data = new StationsAuditCriteriaDataJson();

	public StationsAuditCriteriaJson() {
		super();
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#isAllStations()
	 */
	@Override
	public boolean isAllStations() {
		return data.allStations;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#setAllStations(boolean)
	 */
	@Override
	public void setAllStations(boolean allStations) {
		this.data.allStations = allStations;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#getStations()
	 */
	@Override
	public List<AuditField> getStations() {
		return data.stations;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#setStations(java.util.List)
	 */
	@Override
	public void setStations(List<AuditField> stations) {
		this.data.stations = stations;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#getAuditCriteriaType()
	 */
	@Override
	public String getAuditCriteriaType() {
		return data.auditCriteriaType;
	}

	/* (non-Javadoc)
	 * @see com.ncr.travel.appmgr.model.StationsAuditCriteria#setAuditCriteriaType(java.lang.String)
	 */
	@Override
	public void setAuditCriteriaType(String auditCriteriaType) {
		this.data.auditCriteriaType = auditCriteriaType;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((data == null) ? 0 : data.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		StationsAuditCriteriaJson other = (StationsAuditCriteriaJson) obj;
		if (data == null) {
			if (other.data != null)
				return false;
		} else if (!data.equals(other.data))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "StationsAuditCriteriaJson [isAllStations()=" + isAllStations() + ", getStations()=" + getStations() + ", getAuditCriteriaType()=" + getAuditCriteriaType() + "]";
	}

}
